﻿using Colorful.Furniture.Extensions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace Colorful.Furniture.ErpSupplierManagement;


/// <summary>
/// 列表输出体
/// </summary>
public class SupplierPagedOutputDto : SupplierBaseOutputDto
{
    /// <summary>
    ///  创建时间
    /// </summary>
    public DateTime AddTime { get; set; }

    /// <summary>
    ///  创建时间
    /// </summary>
    public string AddTimeFormat => AddTime.ToDateString("yyyy-MM-dd");

    /// <summary>
    ///  供应商类别
    /// </summary>
    public string Type { get; set; }

    /// <summary>
    ///  供应商类别
    /// </summary>
    public string TypeName { get; set; }

}

/// <summary>
/// 详细信息输出体
/// </summary>
public class SupplierDetailOutputDto : SupplierBaseOutputDto
{

    public bool IsDeleted { get; set; }
    public DateTime? DeletedTime { get; set; }
    public Guid? ModifyUserId { get; set; }
    public DateTime? ModifyTime { get; set; }
    
}


/// <summary>
/// 基础输出体
/// </summary>
public class SupplierBaseOutputDto
{
    /// <summary>
    /// 供应商编码
    /// </summary>
    public Guid Id { get; set; }

    /// <summary>
    ///  供应商编号
    /// </summary>
    public int Code { get; set; }

    /// <summary>
    /// 供应商名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    ///  供应商类别
    /// </summary>
    public string Type { get; set; }

    /// <summary>
    /// 状态（0：待审核；1：已审核）
    /// </summary>
    public int? Status { get; set; }
    
    /// <summary>
    ///  备注
    /// </summary>
    public string Remark { get; set; }

    /// <summary>
    /// 本系统余额
    /// </summary>
    public decimal? Balance { get; set; }

    /// <summary>
    /// 上游授信额度
    /// </summary>
    public decimal? CreditPrice { get; set; }

    /// <summary>
    /// 上游系统余额
    /// </summary>
    public decimal? Price { get; set; }

    /// <summary>
    /// 预警金额
    /// </summary>
    public decimal? WarningPrice { get; set; }

    /// <summary>
    ///  排序字段：值越大越靠前
    /// </summary>
    public long Sort { get; set; }

    /// <summary>
    ///  供应商密钥
    /// </summary>
    public string Key { get; set; }

    /// <summary>
    ///  供应商secret
    /// </summary>
    public string Secret { get; set; }

    /// <summary>
    ///  供应商自身编号
    /// </summary>
    public string MerchantId { get; set; }
    
    /// <summary>
    ///  后台地址
    /// </summary>
    public string ManageUrl { get; set; }

    /// <summary>
    ///  提单地址
    /// </summary>
    public string SubmitOrderUrl { get; set; }

    /// <summary>
    ///  查单地址
    /// </summary>
    public string SearchOrderUrl { get; set; }

    /// <summary>
    ///  查余额地址
    /// </summary>
    public string SearchAccountUrl { get; set; }


}
